package com.inossem.allotin.db.greendao.convert;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.inossem.wms.vo.transport.TransportHead;

import org.greenrobot.greendao.converter.PropertyConverter;

/**
 * @authot guo
 * @data 2019/3/15
 */
public class TransportHeadConvert implements PropertyConverter<TransportHead, String> {

    @Override
    public TransportHead convertToEntityProperty(String databaseValue) {
        return new Gson().fromJson(databaseValue, TransportHead.class);
    }

    @Override
    public String convertToDatabaseValue(TransportHead entityProperty) {
        return new Gson().toJson(entityProperty);
    }
}
